package com.edu.chat.facade.model.enums;

import lombok.Getter;

/**
 * @program: KQAIA
 * @description: 召回知识来源
 * @author: 无恙
 * @create: 2025-03-26 21:28
 **/

@Getter
public enum SourceEnum {
	//知识库文章
	ARTICLE("1", "知识库文章"),

	//知识库文档，pdf
	DOC("2", "知识库文档");


	private final String code;

	private final String desc;

	SourceEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}


	public SourceEnum getCode(String code){
		for (SourceEnum sourceEnum : SourceEnum.values()) {
			if (sourceEnum.code.equals(code)) {
				return sourceEnum;
			}
		}
		return null;
	}


}
